package com.gusha.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @Created：2018-11-09 14:21:54
 * @Author LightSound的代码生成器
 * @Description:Project实体类
 */
@Entity
@Table(name="project")
@NamedQuery(name="Project.findAll", query="SELECT p FROM Project p")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Project implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)    
    private BigInteger id;
    
    //项目发起人
    @ManyToOne(fetch=FetchType.LAZY)
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name="user_id")
    private User user;
    
    //项目类别
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="classify_id")
    private SysClassify classify;
    
    //项目名称
    @Column(name="project_name")
    private String projectName;
    
    //合同编号
    @Column(name="project_no")
    private String projectNo;
    
    //项目描述
    @Column(name="project_desc")
    private String projectDesc;
    
    //项目内容
    @Column(name="project_content")
    private String projectContent;
    
    //项目封面图
    @Column(name="project_icon")
    private String projectIcon;
    
    //项目图片
    @Column(name="project_images")
    private String projectImages;
    
    //项目视频
    @Column(name="project_video")
    private String projectVideo;
    
    //扶持金额
    @Column(name="project_money")
    private BigDecimal projectMoney;
    
    //项目所在省
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="project_province")
    private SysArea projectProvince;
    
    //项目所在市
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="project_city")
    private SysArea projectCity;
    
    //项目所在区
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="project_district")
    private SysArea projectDistrict;
    
    //项目地址
    @Column(name="project_address")
    private String projectAddress;
    
    //关键字
    @Column(name="seo_key")
    private String seoKey;
    
    //标题
    @Column(name="seo_title")
    private String seoTitle;
    
    //描述
    @Column(name="seo_desc")
    private String seoDesc;
    
    //项目开始时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="start_time")
    private Date startTime;
    
    //项目结束时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="end_time")
    private Date endTime;
    
    //项目时间，天
    @Column(name="project_days")
    private Integer projectDays;
    
    //0待审核 1审核通过 2审核不通过
    @Column(name="is_checked")
    private Integer isChecked;
    
    //审核时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="check_time")
    private Date checkTime;
    
    //审核人
    @Column(name="checkor")
    private String checkor;
    
    //审核备注，不通过原因
    @Column(name="check_remark")
    private String checkRemark;
    
    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="create_time")
    private Date createTime;
    
    //更新时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="update_time")
    private Date updateTime;
    
    //更新人
    @Column(name="updator")
    private String updator;
    
    //0未删 1已删
    @Column(name="is_delete")
    private Integer isDelete;
    //开始资金
    @Transient
    private BigDecimal moneyStart;
    //结束资金
    @Transient
    private BigDecimal moneyEnd;
	public BigInteger getId() {
		return id;
	}
	public void setId(BigInteger id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public SysClassify getClassify() {
		return classify;
	}
	public void setClassify(SysClassify classify) {
		this.classify = classify;
	}
	public String getProjectName() {
		return projectName;
	}
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	public String getProjectNo() {
		return projectNo;
	}
	public void setProjectNo(String projectNo) {
		this.projectNo = projectNo;
	}
	public String getProjectDesc() {
		return projectDesc;
	}
	public void setProjectDesc(String projectDesc) {
		this.projectDesc = projectDesc;
	}
	public String getProjectContent() {
		return projectContent;
	}
	public void setProjectContent(String projectContent) {
		this.projectContent = projectContent;
	}
	public String getProjectIcon() {
		return projectIcon;
	}
	public void setProjectIcon(String projectIcon) {
		this.projectIcon = projectIcon;
	}
	public String getProjectImages() {
		return projectImages;
	}
	public void setProjectImages(String projectImages) {
		this.projectImages = projectImages;
	}
	public String getProjectVideo() {
		return projectVideo;
	}
	public void setProjectVideo(String projectVideo) {
		this.projectVideo = projectVideo;
	}
	public BigDecimal getProjectMoney() {
		return projectMoney;
	}
	public void setProjectMoney(BigDecimal projectMoney) {
		this.projectMoney = projectMoney;
	}
	public SysArea getProjectProvince() {
		return projectProvince;
	}
	public void setProjectProvince(SysArea projectProvince) {
		this.projectProvince = projectProvince;
	}
	public SysArea getProjectCity() {
		return projectCity;
	}
	public void setProjectCity(SysArea projectCity) {
		this.projectCity = projectCity;
	}
	public SysArea getProjectDistrict() {
		return projectDistrict;
	}
	public void setProjectDistrict(SysArea projectDistrict) {
		this.projectDistrict = projectDistrict;
	}
	public String getProjectAddress() {
		return projectAddress;
	}
	public void setProjectAddress(String projectAddress) {
		this.projectAddress = projectAddress;
	}
	public String getSeoKey() {
		return seoKey;
	}
	public void setSeoKey(String seoKey) {
		this.seoKey = seoKey;
	}
	public String getSeoTitle() {
		return seoTitle;
	}
	public void setSeoTitle(String seoTitle) {
		this.seoTitle = seoTitle;
	}
	public String getSeoDesc() {
		return seoDesc;
	}
	public void setSeoDesc(String seoDesc) {
		this.seoDesc = seoDesc;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public Integer getProjectDays() {
		return projectDays;
	}
	public void setProjectDays(Integer projectDays) {
		this.projectDays = projectDays;
	}
	public Integer getIsChecked() {
		return isChecked;
	}
	public void setIsChecked(Integer isChecked) {
		this.isChecked = isChecked;
	}
	public Date getCheckTime() {
		return checkTime;
	}
	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}
	public String getCheckor() {
		return checkor;
	}
	public void setCheckor(String checkor) {
		this.checkor = checkor;
	}
	public String getCheckRemark() {
		return checkRemark;
	}
	public void setCheckRemark(String checkRemark) {
		this.checkRemark = checkRemark;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getUpdator() {
		return updator;
	}
	public void setUpdator(String updator) {
		this.updator = updator;
	}
	public Integer getIsDelete() {
		return isDelete;
	}
	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}
	public BigDecimal getMoneyStart() {
		return moneyStart;
	}
	public void setMoneyStart(BigDecimal moneyStart) {
		this.moneyStart = moneyStart;
	}
	public BigDecimal getMoneyEnd() {
		return moneyEnd;
	}
	public void setMoneyEnd(BigDecimal moneyEnd) {
		this.moneyEnd = moneyEnd;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public String toString() {
		return "Project [id=" + id + ", user=" + user + ", classify=" + classify + ", projectName=" + projectName
				+ ", projectNo=" + projectNo + ", projectDesc=" + projectDesc + ", projectContent=" + projectContent
				+ ", projectIcon=" + projectIcon + ", projectImages=" + projectImages + ", projectVideo=" + projectVideo
				+ ", projectMoney=" + projectMoney + ", projectProvince=" + projectProvince + ", projectCity="
				+ projectCity + ", projectDistrict=" + projectDistrict + ", projectAddress=" + projectAddress
				+ ", seoKey=" + seoKey + ", seoTitle=" + seoTitle + ", seoDesc=" + seoDesc + ", startTime=" + startTime
				+ ", endTime=" + endTime + ", projectDays=" + projectDays + ", isChecked=" + isChecked + ", checkTime="
				+ checkTime + ", checkor=" + checkor + ", checkRemark=" + checkRemark + ", createTime=" + createTime
				+ ", updateTime=" + updateTime + ", updator=" + updator + ", isDelete=" + isDelete + ", moneyStart="
				+ moneyStart + ", moneyEnd=" + moneyEnd + "]";
	}
    

}
